package com.yangye.springclouddemomqtt.gateway;

import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;

/**
 * @author yangye
 * @date 2019/11/4 0004
 */
@MessagingGateway(defaultRequestChannel = "mqttOutboundChannel")
public interface MqttGateway {

	void sendToMqtt(@Header(MqttHeaders.TOPIC) String topic, String data);

	void sendToMqtt(@Header(MqttHeaders.TOPIC) String topic, String data,
					@Header(MqttHeaders.QOS) int qos);
}
